#include "crypto_utils.h"

int main() {
    printf("=== Generating SM2 Key Pairs ===\n\n");

    // 生成Alice的密钥对
    printf("Generating Alice's key pair...\n");
    if (generate_sm2_keypair(ALICE_PRIVATE_KEY, ALICE_PUBLIC_KEY) != 1) {
        fprintf(stderr, "Failed to generate Alice's key pair\n");
        return -1;
    }

    printf("\n");

    // 生成Bob的密钥对
    printf("Generating Bob's key pair...\n");
    if (generate_sm2_keypair(BOB_PRIVATE_KEY, BOB_PUBLIC_KEY) != 1) {
        fprintf(stderr, "Failed to generate Bob's key pair\n");
        return -1;
    }

    printf("\n=== Key Generation Completed ===\n");
    printf("Please exchange public keys:\n");
    printf("  Copy %s to Bob\n", ALICE_PUBLIC_KEY);
    printf("  Copy %s to Alice\n", BOB_PUBLIC_KEY);

    return 0;
}
